{include 'admin/layout/header_list'}
<link rel="stylesheet" href="__ADMIN_STATIC__/css/addContent.css?random={extendSetting('random')}">
<div class="addcontent">
    <form class="ajaxForm" method="post" >
        <input type="hidden" name="_method" value="post">
        <input type="hidden" name="dataType" value="{if isset($request['dataType'])}{$request['dataType']}{/if}" >
        <input type="hidden" name="dataId" value="{if isset($request['dataId'])}{$request['dataId']}{/if}" >
        <table class="table">
            <tr >
                <td class="tl">
                    <span>上级分类</span>
                </td>
                <td class="categoryBox">
                    <input type="hidden" class="pid" name="pid" value="0" >
                    {LTcms:categoryMultiHtml dataFields="pid" dataType="<request.dataType>"  dataId="<request.dataId>"  /}
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span><strong>* </strong>名称</span>
                </td>
                <td>
                    <input class="long" name="name" type="text" >颜色：
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span>分类目录</span>
                </td>
                <td>
                    <input class="long" name="catDir" type="text" >
                </td>
            </tr>
            <tr >
                <td class="tl">
                    <span>级别</span>
                </td>
                <td>
                    <input type="text" name="level" value="1">
                    <i class="tips1 iconfont icon-yiwen" title="0 - 不在首页显示 1 - 正常显示 2 - 首页和上级分类并列显示"></i>
                </td>
            </tr>
            <!--<tr >-->
                <!--<td>-->
                    <!--<span>字段</span>-->
                <!--</td>-->
                <!--<td>-->
                    <!--<input type="text" name="fieldIndex" value="">-->
                <!--</td>-->
            <!--</tr>-->
            <tr >
                <td class="tl">
                    <span>缩略图</span>
                </td>
                <td class="webUploadBox" >
                    <input class="rendercls long" type="text" name="thumbnail" value="" id="image">
                    <div class="webUploadFilePicker upload" >[上传]</div>
                    <div class="upload" id="clear">[删除]</div>
                </td>
            </tr>

            <tr>
                <td class="tl">
                    <span>列表模板</span>
                </td>
                <td>
                    <select name="template_list" >
                        <option value="">默认模板</option>
                        {if isset($templateCategory['global']['list']) && $templateCategory['global']['list']}
                        {foreach $templateCategory['global']['list'] $key $val}
                        <option value="{$key}">{$val}</option>
                        {/foreach}
                        {/if}

                        {if isset($templateCategory['module'][$request['dataId']]['list']) && $templateCategory['module'][$request['dataId']]['list']}
                        {foreach $templateCategory['module'][$request['dataId']]['list'] $key $val}
                        <option value="{$key}">{$val}</option>
                        {/foreach}
                        {/if}
                    </select>
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span>内容模板</span>
                </td>
                <td>
                    <select name="template_content" >
                        <option value="">默认模板</option>
                        {if isset($templateCategory['global']['detail']) && $templateCategory['global']['detail']}
                        {foreach $templateCategory['global']['detail'] $key $val}
                        <option value="{$key}">{$val}</option>
                        {/foreach}
                        {/if}

                        {if isset($templateCategory['module'][$request['dataId']]['detail']) && $templateCategory['module'][$request['dataId']]['detail']}
                        {foreach $templateCategory['module'][$request['dataId']]['detail'] $key $val}
                        <option value="{$key}">{$val}</option>
                        {/foreach}
                        {/if}
                    </select>
                </td>
            </tr>
            <tr >
                <td class="tl">
                    <span>排序</span>
                </td>
                <td>
                    <input type="text" name="sort" value="">
                </td>
            </tr>
            <tr >
                <td class="tl">
                    <span>Title(SEO标题)</span>
                </td>
                <td>
                    <input type="text" name="seo_title" value="">
                </td>
            </tr>
            <tr >
                <td class="tl">
                    <span>Meta Keywords<br />(网页关键词)</span>
                </td>
                <td>
                    <input type="text" name="seo_keywords" value="">
                </td>
            </tr>
            <tr >
                <td class="tl">
                    <span>Meta Description<br />(网页描述)</span>
                </td>
                <td>
                    <input type="text" name="seo_description" value="">
                </td>
            </tr>
            <tr>
                <td class="tl">
                    <span><strong></strong>状态</span>
                </td>
                <td>
                    <p class="article-status">
                        <input name="disabled" type="radio" value="1" checked >开启
                        <input name="disabled" type="radio" value="0" >禁用
                    </p>
                </td>
            </tr>
        </table>
        <div class="ltcms-button">
            <button class="btns submit ajaxBtn" type="button" data-submit-url="{LTCMS_ROUTE_PREFIX}/category" data-form=".ajaxForm" data-location-url="{LTCMS_ROUTE_PREFIX}/category?dataType={if isset($request['dataType'])}{$request['dataType']}{/if}&dataId={if isset($request['dataId'])}{$request['dataId']}{/if}" data-close="5" >保存并提交</button>
            <button class="btns cancel">取消并返回</button>
        </div>
    </form>
</div>
<script src="__ADMIN_STATIC__/js/addContent.js?random={extendSetting('random')}"></script>
{include 'admin/layout/file_upload_script_auto'}
{include 'admin/layout/footer'}